<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>.: cPanel - <%=LG::ALBUM%> :.</title>
	<?php $this->import()?>
	<script type="text/javascript">
		$(function() {
			$("#name").focus();
		});
	</script>
</head>
<body>
	<?php $this->header()?><br/>
		<table width="100%"><tr>
			<td align="left"><a href="?c=album&a=grid"><%=LG::ALBUMS%></a> > <%=LG::G_EDIT%></td>
		</tr></table>
		<hr/>
		<center><form action="" method="post" enctype="multipart/form-data">
			<b class="error"><%=$msg%></b>
			<table class="grid" cellspacing="1" cellpadding="5">
				<tr>
					<td align="left"><%=LG::G_NAME%>:</td>
					<td align="left"><input id="name" name="name" maxlength="50" value="<%=$album->name%>"/></td>
				</tr>
				<?php foreach($this->LANGUAGES as $lang) { $isExist = false; ?>
					<?php foreach($album->details as $detail) { if ($lang->code == $detail->languageCode) { ?>
						<tr>
							<td align="left"><img src="<%=Properties::LANG_DIR%>/<%=$lang->code%>.<%=Image::EXT_PNG%>"/> <%=$lang->name%>:</td>
							<td align="left">
								<input name="names[]" maxlength="50" value="<%=$detail->content%>"/>
								<input type="hidden" name="codes[]" value="<%=$lang->code%>"/>
							</td>
						</tr>
					<?php $isExist = true; break; } } ?>
					<?php if (!$isExist) {?>
						<tr>
							<td align="left"><img src="<%=Properties::LANG_DIR%>/<%=$lang->code%>.<%=Image::EXT_PNG%>"/> <%=$lang->name%>:</td>
							<td align="left">
								<input name="names[]" maxlength="50" value=""/>
								<input type="hidden" name="codes[]" value="<%=$lang->code%>"/>
							</td>
						</tr>
					<?php }?>
				<?php }?>
				<tr>
					<td align="left"><%=LG::G_IMG%>:</td>
					<td align="left"><input name="img" type="file"/></td>
				</tr>
			</table>
			<hr/>
			<input type="submit" value="<%=LG::F_SAVE%>"/>
		</form></center>
		<br/>
	<?php $this->footer()?>
</body>
</html>